-- GENERATED SPELL FOR [Rumbling Earth-Heart] --


function spell0_22313(pUnit, Event) --@Earth Rumble,Self--
pUnit:FullCastSpellOnTarget(33840,pUnit)
pUnit:RegisterEvent('Sorts_22313', 8000, 1)
end

function spell1_22313(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_22313', 584, 1)
end

function Sorts_22313(pUnit, Event)
local choix_sorts_22313 = math.random(0, 1)
if choix_sorts_22313 == 0 then
pUnit:RegisterEvent('spell0_22313', 1, 1)
end
if choix_sorts_22313 == 1 then
pUnit:RegisterEvent('spell1_22313', 1, 1)
end
end

function mob22313_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22313', math.random(1500, 3000), 1)
end

function mob22313_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22313_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22313_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22313, 1, 'mob22313_Action')
RegisterUnitEvent(22313, 2, 'mob22313_Leave')
RegisterUnitEvent(22313, 3, 'mob22313_Kill')
RegisterUnitEvent(22313, 4, 'mob22313_Die')
